package com.example.test.springdemo.service.impl;

import com.example.test.springdemo.common.Result;
import com.example.test.springdemo.domain.AdminUser;
import com.example.test.springdemo.domain.AdminUserExample;
import com.example.test.springdemo.mapper.AdminUserMapper;
import com.example.test.springdemo.service.AdminUserService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：吉金武
 * @ClassName AdminUserServiceImpl
 * @date ：2022/1/22 - 22:45
 * @version: V1.0
 * @slogan: 天下风云出我辈，一入代码岁月催
 * @description:
 **/
@Service
public class AdminUserServiceImpl  implements AdminUserService {

    @Autowired
    private AdminUserMapper adminUserMapper;


    @Override
    public void addUser(AdminUser adminUser) {

    }

    @Override
    public void deleteUser(Long id) {
        adminUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public PageInfo pageList(Integer pageNow, Integer pageSize, String username) {
        return null;
    }

    @Override
    public List<AdminUser> getAllUser(AdminUser adminUser) {
     return adminUserMapper.getAllUser(adminUser);
/*        AdminUserExample adminUserExample = new AdminUserExample();
        return adminUserMapper.selectByExample(adminUserExample);*/
    }

    @Override
    public int update(AdminUser adminUser) {
        return adminUserMapper.updateByPrimaryKeySelective(adminUser);
    }

    @Override
    public Result selectRole() {
        return null;
    }

    @Override
    public Result addRoles(Long id, Long[] ids) {
        return null;
    }

    @Override
    public void insert(AdminUser adminUser) {
        adminUserMapper.insert(adminUser);
    }

}

